<template>
  <default-home-card icon="BarChartOutlined" title="考试总览">
    <div class="echarts-box">
      <div class="gradient-main" id="gradient-main"></div>
    </div>
  </default-home-card>
</template>
<script setup>
  import DefaultHomeCard from '/@/views/system/home/components/default-home-card.vue';
  import * as echarts from 'echarts';
  import { onMounted, reactive } from 'vue';

  const data = reactive({
    lista: [],
    listb: [],
  });
  onMounted(() => {


  });

  function init() {
    let option = {
      xAxis: {
        type: 'category',
        data: data.lista,
      },
      yAxis: {
        type: 'value',
      },
      series: [
        {
          data: data.listb,
          type: 'line',
          smooth: true
        },
      ],
    };

    let chartDom = document.getElementById('gradient-main');
    if (chartDom) {
      let myChart = echarts.init(chartDom);
      option && myChart.setOption(option);
    }
  }
</script>
<style lang="less" scoped>
  .echarts-box {
    display: flex;
    align-items: center;
    justify-content: center;
    .gradient-main {

      width: 2000px;
      height: 400px;
      background: #fff;
    }
  }
</style>
